<?php 
/* SVN FILE: $Id$ */
/* Item Test cases generated on: 2008-12-21 17:12:00 : 1229882040*/
App::import('Model', 'Item');

class ItemTestCase extends CakeTestCase {
	var $Item = null;
	var $fixtures = array('app.item', 'app.condition', 'app.category', 'app.user', 'app.image');

	function startTest() {
		$this->Item =& ClassRegistry::init('Item');
	}

	function testItemInstance() {
		$this->assertTrue(is_a($this->Item, 'Item'));
	}

	function testItemFind() {
		$this->Item->recursive = -1;
		$results = $this->Item->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Item' => array(
			'id'  => 'Lorem ipsum dolor sit amet',
			'title'  => 'Lorem ipsum dolor sit amet',
			'short_description'  => 'Lorem ipsum dolor sit amet',
			'long_description'  => 'Lorem ipsum dolor sit amet',
			'condition_id'  => 'Lorem ipsum dolor sit amet',
			'expiration_date'  => '2008-12-21 17:53:59',
			'active'  => 1,
			'category_id'  => 'Lorem ipsum dolor sit amet',
			'user_id'  => 'Lorem ipsum dolor sit amet',
			'created'  => '2008-12-21 17:53:59',
			'modified'  => '2008-12-21 17:53:59'
			));
		$this->assertEqual($results, $expected);
	}
}
?>